function z=int2bin(i,nt)

if(nargin<2)
	nt=8;
end
z=zeros(1,nt);
for j=1:length(z)
	z(j)=floor(i/power(2,length(z)-j));
	i=i-z(j)*power(2,length(z)-j);
end


